﻿<?xml version="1.0" encoding="utf-8"?>
<witd:WITD application="Work item type editor" version="1.0" xmlns:witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="Acceptance Test">
    <DESCRIPTION>Describes an Acceptance Test</DESCRIPTION>
    <FIELDS>
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension" />
      <FIELD name="Iteration ID" refname="System.IterationId" type="Integer" />
      <FIELD name="External Link Count" refname="System.ExternalLinkCount" type="Integer" reportable="measure" formula="sum" />
      <FIELD name="Team Project" refname="System.TeamProject" type="String" reportable="dimension" />
      <FIELD name="Hyperlink Count" refname="System.HyperLinkCount" type="Integer" reportable="measure" formula="sum" />
      <FIELD name="Attached File Count" refname="System.AttachedFileCount" type="Integer" reportable="measure" formula="sum" />
      <FIELD name="Node Name" refname="System.NodeName" type="String" />
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The AreaPath can be used to categorise or theme the Acceptance Test</HELPTEXT>
      </FIELD>
      <FIELD name="Revised Date" refname="System.RevisedDate" type="DateTime" reportable="detail" />
      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" reportable="dimension" />
      <FIELD name="ID" refname="System.Id" type="Integer" reportable="dimension">
        <HELPTEXT>Human readable, auto-populated numeric Id</HELPTEXT>
      </FIELD>
      <FIELD name="Area ID" refname="System.AreaId" type="Integer" />
      <FIELD name="Authorized As" refname="System.AuthorizedAs" type="String" syncnamechanges="true" />
      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
        <HELPTEXT>Name or short description</HELPTEXT>
        <REQUIRED />
        <CANNOTLOSEVALUE />
      </FIELD>
      <FIELD name="State" refname="System.State" type="String" reportable="dimension">
        <HELPTEXT>This is the status of the Acceptance Test Item as selected by the Product Owner or QA</HELPTEXT>
      </FIELD>
      <FIELD name="Authorized Date" refname="System.AuthorizedDate" type="DateTime" />
      <FIELD name="Watermark" refname="System.Watermark" type="Integer" />
      <FIELD name="Rev" refname="System.Rev" type="Integer" reportable="dimension" />
      <FIELD name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true" reportable="dimension" />
      <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension" />
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
        <HELPTEXT>Required for MTLM support</HELPTEXT>
        <ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
          <LISTITEM value="[project]\Project Administrators" />
          <LISTITEM value="[project]\Contributors" />
        </ALLOWEDVALUES>
      </FIELD>
      <FIELD name="Work Item Type" refname="System.WorkItemType" type="String" reportable="dimension" />
      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" reportable="dimension" />
      <FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />
      <FIELD name="Description" refname="System.Description" type="HTML">
        <HELPTEXT>A description of the Acceptance Test</HELPTEXT>
      </FIELD>
      <FIELD name="History" refname="System.History" type="History">
        <HELPTEXT>Discussion thread and other historical information including fields that have changed, by whom and when.</HELPTEXT>
      </FIELD>
      <FIELD name="Related Link Count" refname="System.RelatedLinkCount" type="Integer" />
      <FIELD name="Tags" refname="System.Tags" type="PlainText" />
      <FIELD name="History Date (Scrum v3)" refname="Scrum.v3.HistoryDate" type="DateTime" reportable="dimension">
        <COPY from="clock" />
        <DEFAULT from="clock" />
      </FIELD>
      <FIELD name="Priority" refname="Microsoft.VSTS.Common.Priority" type="Integer" reportable="dimension">
        <HELPTEXT>Importance of this test case to the business goals of the product. 1=Most important.</HELPTEXT>
        <WHEN field="System.Rev" value="">
          <COPY from="value" value="2" />
        </WHEN>
        <ALLOWEDVALUES expanditems="true">
          <LISTITEM value="1" />
          <LISTITEM value="2" />
          <LISTITEM value="3" />
          <LISTITEM value="4" />
        </ALLOWEDVALUES>
      </FIELD>
      <FIELD name="Steps" refname="Microsoft.VSTS.TCM.Steps" type="HTML">
        <HELPTEXT>Steps required to perform the test</HELPTEXT>
      </FIELD>
      <FIELD name="Parameters" refname="Microsoft.VSTS.TCM.Parameters" type="HTML" />
      <FIELD name="AutomatedTestName" refname="Microsoft.VSTS.TCM.AutomatedTestName" type="String">
        <HELPTEXT>The name of the test that automates this test case</HELPTEXT>
      </FIELD>
      <FIELD name="AutomatedTestStorage" refname="Microsoft.VSTS.TCM.AutomatedTestStorage" type="String">
        <HELPTEXT>The assembly containing the test that automates this test case</HELPTEXT>
      </FIELD>
      <FIELD name="AutomatedTestId" refname="Microsoft.VSTS.TCM.AutomatedTestId" type="String">
        <HELPTEXT>The ID of the test that automates this test case</HELPTEXT>
      </FIELD>
      <FIELD name="AutomatedTestType" refname="Microsoft.VSTS.TCM.AutomatedTestType" type="String">
        <HELPTEXT>The type of the test that automates this test case</HELPTEXT>
      </FIELD>
      <FIELD name="LocalDataSource" refname="Microsoft.VSTS.TCM.LocalDataSource" type="HTML" />
      <FIELD name="Automation status" refname="Microsoft.VSTS.TCM.AutomationStatus" type="String" reportable="dimension">
        <WHENNOT field="Microsoft.VSTS.TCM.AutomatedTestId" value="">
          <COPY from="value" value="Automated" />
          <ALLOWEDVALUES expanditems="true">
            <LISTITEM value="Automated" />
          </ALLOWEDVALUES>
        </WHENNOT>
        <WHEN field="Microsoft.VSTS.TCM.AutomatedTestId" value="">
          <ALLOWEDVALUES expanditems="true">
            <LISTITEM value="Not Automated" />
            <LISTITEM value="Planned" />
          </ALLOWEDVALUES>
          <DEFAULT from="value" value="Not Automated" />
        </WHEN>
      </FIELD>
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="Deleted" />
        <STATE value="Not Implemented" />
        <STATE value="Ready for Test" />
        <STATE value="Failed" />
        <STATE value="Passed" />
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="Not Implemented" to="Deleted">
          <REASONS>
            <DEFAULTREASON value="Item marked as deleted" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Ready for Test" to="Deleted">
          <REASONS>
            <DEFAULTREASON value="Item marked as deleted" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Failed" to="Deleted">
          <REASONS>
            <DEFAULTREASON value="Item marked as deleted" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Passed" to="Deleted">
          <REASONS>
            <DEFAULTREASON value="Item marked as deleted" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="" to="Not Implemented">
          <REASONS>
            <DEFAULTREASON value="New Acceptance Test" />
          </REASONS>
          <FIELDS>
            <FIELD refname="System.AssignedTo">
              <DEFAULT from="currentuser" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Deleted" to="Not Implemented">
          <REASONS>
            <DEFAULTREASON value="Deleted item restored" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Deleted" to="Ready for Test">
          <REASONS>
            <DEFAULTREASON value="Deleted item restored" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Not Implemented" to="Ready for Test">
          <REASONS>
            <DEFAULTREASON value="Ready for Test" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Failed" to="Ready for Test">
          <REASONS>
            <DEFAULTREASON value="Ready for Retest" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Deleted" to="Failed">
          <REASONS>
            <DEFAULTREASON value="Deleted item restored" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Ready for Test" to="Failed">
          <REASONS>
            <DEFAULTREASON value="Test Failure" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Passed" to="Failed">
          <REASONS>
            <DEFAULTREASON value="The test no longer passes" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Deleted" to="Passed">
          <REASONS>
            <DEFAULTREASON value="Deleted item restored" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Ready for Test" to="Passed">
          <REASONS>
            <DEFAULTREASON value="Test has passed" />
          </REASONS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout>
        <Group Margin="(0,0,0,4)">
          <Column PercentWidth="100">
            <Control FieldName="System.Title" Type="FieldControl" Label="Title" LabelPosition="Left" />
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="50">
            <Group Label="Status">
              <Column PercentWidth="100">
                <Control FieldName="System.State" Type="FieldControl" Label="State" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
          <Column PercentWidth="50">
            <Group Label="Classification">
              <Column PercentWidth="100">
                <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="Area" LabelPosition="Left" />
                <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Iteration" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
        <TabGroup>
          <Tab Label="Steps">
            <Control FieldName="Microsoft.VSTS.TCM.Steps" Type="TestStepsControl" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="Description and History">
            <Control FieldName="System.Description" Type="HtmlFieldControl" Label="Detailed Description:" LabelPosition="Top" Dock="Fill" />
            <Control FieldName="System.History" Type="WorkItemLogControl" Label="History:" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="Associated Automation">
            <Control Type="AssociatedAutomationControl" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="Tests">
            <Control Type="LinksControl" Name="BacklogItemLink" Label="The tested Backlog Item:" LabelPosition="Top">
              <LinksControlOptions>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="Microsoft.VSTS.Common.TestedBy" FilterOn="reversename" />
                </WorkItemLinkFilters>
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Product Backlog Item" />
                </WorkItemTypeFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <LinkColumns>
                  <LinkColumn RefName="System.ID" />
                  <LinkColumn RefName="System.Links.LinkType" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Failed By">
            <Control Type="LinksControl" Name="LinkedBugs" Label="The test failures:" LabelPosition="Top">
              <LinksControlOptions>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="Scrum.FailedBy" FilterOn="forwardname" />
                </WorkItemLinkFilters>
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Bug" />
                </WorkItemTypeFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <LinkColumns>
                  <LinkColumn RefName="System.ID" />
                  <LinkColumn RefName="System.Links.LinkType" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="All Links">
            <Control Type="LinksControl" Name="OtherLinks">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.ID" />
                  <LinkColumn RefName="System.Links.LinkType" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="File Attachments">
            <Control Type="AttachmentsControl" LabelPosition="Top" />
          </Tab>
          <Tab Label="Process Guidance">
            <Control Type="WebpageControl" LabelPosition="Top" Dock="Fill">
              <WebpageControlOptions AllowScript="false">
                <Link UrlRoot="http://www.scrumforteamsystem.co.uk/" UrlPath="/processguidance/v3/{0}/{1}">
                  <Param Index="0" Value="System.WorkItemType" Type="Current" />
                  <Param Index="1" Value="System.State" Type="Current" />
                </Link>
              </WebpageControlOptions>
            </Control>
          </Tab>
        </TabGroup>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</witd:WITD>